package org.yinxianren.www.study_02.study.arithmetic;

import edu.princeton.cs.algs4.StdOut;

public interface IArithmetic {

    default  void show(Comparable[] a){
        for(int i=0;i<a.length;i++)
            StdOut.print(a[i]+" ");
        StdOut.println();
    }

    default boolean less(Comparable v, Comparable w){
        return v.compareTo(w) < 0;
    }

    default void exch(Comparable[] a, int i,int j){
        Comparable t=a[i];
        a[i] = a[j];
        a[j] =t;
    }

}
